<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>HOU-Công tác sinh viên</title>
        <LINK REL="SHORTCUT ICON" href="<?php echo base_url(); ?>public/img/icon-logo.jpg"/>
        <link href="<?php echo base_url(); ?>public/css/Style-19-3.css" rel="stylesheet" type="text/css" />
        <link rel="stylesheet" type="text/css" href="<?php echo base_url(); ?>public/css/style.css"/>
        <link rel="stylesheet" href="<?php echo base_url(); ?>public/js/themes/base/jquery.ui.all.css"/>
        <script src="<?php echo base_url(); ?>public/js/jquery-1.10.2.js"></script>
        <script src="<?php echo base_url(); ?>public/js/ui/jquery.ui.core.js"></script>
        <script src="<?php echo base_url(); ?>public/js/ui/jquery.ui.widget.js"></script>
        <script src="<?php echo base_url(); ?>public/js/ui/jquery.ui.mouse.js"></script>
        <script src="<?php echo base_url(); ?>public/js/ui/jquery.ui.button.js"></script>
        <script src="<?php echo base_url(); ?>public/js/ui/jquery.ui.position.js"></script>
        <script src="<?php echo base_url(); ?>public/js/ui/jquery.ui.menu.js"></script>
        <script src="<?php echo base_url(); ?>public/js/ui/jquery.ui.accordion.js"></script>
        <script src="<?php echo base_url(); ?>public/js/ui/jquery.ui.selectable.js"></script>
        <style type="text/css">
            .donduyet{
                width:1200px;
                margin: 0 auto;
                background-color: white;
                height: 1200px;
            }
            table,th,td{

                border: 1px solid black;
                border-collapse: collapse;
            }
            th{
                text-align: center;
                background: #0074c7;
                color: white;
                height: 30px;

                margin-left: 10px;
            }
            tr.id-silent{
                background-color: #0074c7;
            }
            th.silent1{
                width: 120px;
            }
            th.silent2{
                width: 150px;
            }
            th.silent3{
                width: 100px;
            }
            th.silent4{
                width: 150px;
            }
            th.silent5{
                width: 120px;
            }
            td p{
                margin: 5px 5px;
            }
            .donduyet p.page{
                float: right;   
            }
            .list-ds{
                margin: 10px 45px;
            }
            .list-ds h1{
                text-align: center;
                margin-bottom: 5px;
            }
            .list-ds p.report{
                text-align: center;
            }
            .list-ds p.report a{
                text-decoration: none; 
                color: black;
            }
        </style>
    </head>
    <body class="body-contaiter">
        <?php
        $user = $this->session->userdata['user'];
        ?>
        <div class="page-contaiter">
            <div class="top-contaiter">
                <?php
                include 'sv-banner.php';
                ?>
                <div id="nav-top">
                    <img  id="icon" src="<?php echo base_url(); ?>public/img/logo-nav.png" alt="Quan ly ho so"/>
                    <div class="nav-nav">
                        <h1 style="color: white;">Quản lý đơn</h1>
                        <ul style="margin: 2px 0;">
                            <li style="list-style:none;">Các đơn đã gửi</li>
                        </ul>
                    </div> <!--end .nav-nav-->
                </div><!--end.nav-top-->
            </div>
            <div class="center-contaiter">

                <div id="content-sinhvien">
                    <table id="tb-don-sv">
                        <caption>
                            <h2> Danh sách đơn<h2>
                                    </caption>

                                    <tr id="row-don" >
                                        <th	 class="silent1">   Mã đơn</th>
                                        <th class="silent2">   Tên đơn</th>
                                        <th class="silent3">  Ngày lập</th>
                                        <th class="silent4">  Ghi chú</th>
                                        <th class="silent5"> Chức năng</th>
                                    </tr>

                                    <?php
                                    if ($dsdonsv != NULL) {
                                        foreach ($dsdonsv as $key => $value) {
                                            ?>
                                            <tr id="row-don" 
                                            <?php
                                            if ($value->TrangThai == -1) {
                                                echo 'style="color:red"';
                                            }
                                            ?>

                                                >
                                                <td class="col1-donsv">   <?php echo $value->Ma_Don_SV ?></td>
                                                <td class="col2-donsv">   <?php echo $value->TenBieuMau; ?></td>
                                                <td class="col3-donsv">   <?php echo $value->NgayLap; ?></td>
                                                <td class="col5-donsv">   
                                                    <?php
                                                    echo $value->GhiChu;
                                                    ?>
                                                </td>
                                                <td class = "col6-donsv">

                                                    <?php
                                                    echo form_open(base_url() . 'sinhvien/xuly_don_ds');
                                                    echo form_hidden('Ma_Don_SV', $value->Ma_Don_SV);

                                                    if ($value->Loai == 0&&$value->DaIn==0) {

                                                        echo '<button type="submit" name="bt" value="3">In</button>';
                                                    }

                                                    echo '<button type="submit" name="bt" value="4">Xem chi tiết</button>';
                                                    if ($value->TrangThai < 1) {
                                                        echo '<button type="submit" name="bt" value="1">Xóa</button>';
                                                    }

                                                    echo form_close();
                                                    ?>
                                                </td>
                                            </tr>
                                            <?php
                                        }
                                    }
                                    ?>

                                    </table>


                                    </div>

                                    </div>
                                    </div>
                                    </body>
                                    </html>
